<template>
	<!-- 分类管理 -->
	<section class="type-manage">
		<CommonTable :table-config="noticeClass.getTableConfig()">
			<template #header>
				<CommonSearch :form-data="noticeClass.getSearchCol()" @search="val => noticeClass.serach(val)" />
			</template>
			<template #search>
				<el-button type="primary" :icon="Plus" @click="noticeClass.add()">新增</el-button>
			</template>
		</CommonTable>
		<CommonDialog
			width="400"
			:title="noticeClass.title.value"
			v-model="noticeClass.visible.value"
			:option-btns="noticeClass.btns()"
		>
			<template #default>
				<CommonForm ref="commonForm" :form-data="noticeClass.getFormCol()" :default-value="noticeClass.defaultValue.value" />
			</template>
		</CommonDialog>
	</section>
</template>
<script lang="ts" setup name="NoticeManage">
import { Plus } from '@element-plus/icons-vue'
import { NoticeClass } from './controller'
import { ref } from 'vue'
const commonForm = ref()
let noticeClass = new NoticeClass(commonForm)
</script>
